package com.zlc.study.controller;

import cn.hutool.core.date.DateUtil;
import com.zlc.study.service.FunctionAssistant;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class ChatFunctionCallingController {
    @Resource
    private FunctionAssistant functionAssistant;

    @GetMapping("/chatfunction/test1")
    public String test1(){
        String chat = functionAssistant.chat("开张发票，公司：文化有限公司 税号：wenhuayouxian321 金额：848.23");
        System.out.println(chat);
        return "success:" + DateUtil.now()+ "\t" +chat;
    }

}
